//////////////////////////////////////////////////////////////////////////////
//
//  Created by Philip Mulcahy on 01/03/2013.
//  Copyright (c) 2013 Philip Mulcahy. All rights reserved.
//
//  This file is part of the note-recog library.
//
//  note-recog is free software: you can redistribute it and/or modify
//  it under the terms of version 3 of the GNU Lesser General Public License 
//  as published by the Free Software Foundation.
//
//  note-recog is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with note-recog. If not, see <http://www.gnu.org/licenses/>.
//
//////////////////////////////////////////////////////////////////////////////

#ifndef note_recog_ReplayFrameGenerator_h
#define note_recog_ReplayFrameGenerator_h

#include "IIterable.h"
#include <deque>

class Frame;

class ReplayFrameGenerator : public IIterable<Frame>
{
public:
    ReplayFrameGenerator(const char* file_path, float sampling_freq, size_t frame_size);
    virtual Frame next();
    virtual bool hasNext() const;
    virtual ~ReplayFrameGenerator();
private:
    const float _sampling_freq;
    std::deque<short> _time_domain;
    const size_t _frame_size;
    float _next_timestamp;
    ReplayFrameGenerator(); // not implemented
    ReplayFrameGenerator(const ReplayFrameGenerator&); // not implemented
    ReplayFrameGenerator& operator=(const ReplayFrameGenerator&); // not implemented
};

#endif
